<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>title</title>
      <link rel="stylesheet" type="text/css" href="../css/api.css"/>
      <style>
          html,
          body {
              height: 100%;
              background: #f0f0f0;
          }
          header {
              background-color: #fcfcfc;
              border-bottom: solid #dddfe3 1px;
          }

          h1 {
              height: 50px;
              line-height: 50px;
              color: rgb(38, 38, 38);
              font-size: 20px;
              text-align: center;
          }

          .back {
              position: absolute;
              left: 0;
              bottom: 0;
              width: 50px;
              height: 50px;
              background: url(../image/header/back.png) center center no-repeat;
              background-size: 15px auto;
          }
          .btn {
              margin: 3px 10px;
              background: #009A98;
              height: 40px;
              line-height: 40px;
              text-align: center;
              font-size: 20px;
              margin-top: 50px;
              border-radius: 5px;
              color: #fff;
          }

          .highlight {
              opacity: 0.7;
          }
          .item-hov {
              background-color: #E8E8E8;
          }
          .item {
              height:60px;
              padding-left: 15px;
              background-color: #fff;
          }
          .item .title{
              line-height: 60px;
              float: left;

          }
          .item input{
              margin-top: 10px;
              float: right;
              border-bottom: 2px solid #D7E2EA;
              height: 40px;
              margin-right: 20px;
          }
          input:focus{
              outline:none;

              border-bottom: 3px solid #D7E2EA;
          }
          .item_arrow{
              float: right;
              margin-top:15px;
              margin-right: 20px;
          }
          .value {
              position: absolute;

              right: 100px;
              height: 60px;
              font-size: 18px;
              text-align: right;
              line-height: 60px;
              color: #888;
          }

          .h10{
              height: 20px;
              background-color: #f0f0f0;
          }
      </style>
  </head>
  <body>
      <header id="header">
        <!-- 图标 -->
          <div class="back event-back"></div>
          <h1>发布活动</h1>
      </header>
      <div class="item">
          <div class="title">标题：</div>
          <input type="text" id="activity_title">
      </div>
      <div class="h10"></div>
      <div class="item">
          <div class="title">地点：</div>
          <input type="text" id="activity_place">

      </div>
      <div class="h10"></div>
      <div class="item">
          <div class="title">发起人：</div>
          <input type="text" id="activity_person">

      </div>
      <div class="h10"></div>
      <div class="item" onclick="fnSetTime();">
          <div class="title">时间</div>
          <div id="time" class="value"></div>
          <image src="../image/arrow.png" class="item_arrow">
      </div>
      <div class="h10"></div>
      <div class="item">
          <div class="title">内容</div>
          <input type="text">
      </div>



      <div class="btn" tapmode="highlight">发布</div>
  </body>
  <script type="text/javascript" src="../script/api.js"></script>
  <script type="text/javascript" src="../script/common.js"></script>
  <script type="text/javascript">
      apiready = function(){
          fnInit();
          fnSetActivity();
          fnReady();
      };
      var time;
      function fnInit(){
          time=$api.byId('time')
      }
      function fnSetInfo() {

          time.innerHTML = $api.getStorage('time') || '';


          api.sendEvent({
              name: 'setActivity'
          });
      };
      function fnSetActivity(){
          time.innerHTML=$api.getStorage('time')||'';
          api.sendEvent({
              name: 'setActivity',

          });

      }

      function fnSetTime() {
          api.openPicker({
              type: 'date',
              date: time.innertHTML,
              title: '日期'
          }, function(ret, err) {
              $api.setStorage('time', ret.year + '-' + ret.month + '-' + ret.day);
              fnSetInfo();
          });
      };
  </script>
  </html>
